Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved Labels Rendering Logic #72

Merged

Conversation

OssamaRafique
Copy link
Member

Optimization of updateLabels and Throttle Implementation


📌 Changes:

  • SVG Dimension Retrieval:

    • Refactored the updateLabels function.
    • svgWidth and svgHeight are now obtained once via getBoundingClientRect, enhancing performance.
  • Throttle Integration:

    • Added throttleWithRAF to optimize function calls, ensuring they align with the browser's frame rate.

Copy link
Member

@jkanche jkanche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mostly looks good, but may be a more understandable function name

src/epiviz.gl/utilities.js Show resolved Hide resolved
Copy link
Member

@jkanche jkanche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@OssamaRafique OssamaRafique merged commit a15776f into epiviz:main Aug 8, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants